package it.koutifaris.travianmap.view.serversettingsview;

import it.koutifaris.travianmap.R;
import it.koutifaris.travianmap.context.HasApplicationContex;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ProgressBar;

public class ServerView extends HasApplicationContex {

	public CheckBox getAutoUpdate() {
		return (CheckBox) getActivity().findViewById(R.id.autoUpdateCheckBox);
	}

	public CheckBox getWifiOnly() {
		return (CheckBox) getActivity().findViewById(R.id.wifiOnlyCheckBox);
	}

	public EditText getServerTextBox() {
		return (EditText) getActivity().findViewById(R.id.serverText);
	}

	public Button getOkButton() {
		return (Button) getActivity().findViewById(R.id.serverOk);
	}

	public Button getCancelButton() {
		return (Button) getActivity().findViewById(R.id.serverCancel);
	}

	public void showProgressBar() {
		getActivity().findViewById(R.id.serverProgressBarLayer).setVisibility(ProgressBar.VISIBLE);
	}

	public void hideProgressBar() {
		getActivity().findViewById(R.id.serverProgressBarLayer).setVisibility(ProgressBar.INVISIBLE);
	}
}
